package org.example.designPattern.structural.composite;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

public class Leader extends Employees{
    private List<Employees> grassrootsEmployeesList = new ArrayList<>();

    public Leader(String name, String pla, double salary) {
        super(name, pla, salary);
    }


    public void setGrassrootsEmployees(Employees... employees){
        grassrootsEmployeesList.addAll(Arrays.asList(employees));
    }

    public List<Employees> getGrassrootsEmployeesList() {
        return grassrootsEmployeesList;
    }
}
